<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/extend/jquery-ui-1.9.2.custom.css?v={{ layui.setter.version }}" media="all"/>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/extend/jquery.autocompleter.css?v={{ layui.setter.version }}" media="all"/>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/declare.css?v={{ layui.setter.version }}" media="all"/>
</script>
<div class="child-box">
    <div class="layui-card layadmin-header">
        <div class="layui-breadcrumb" lay-filter="breadcrumb">
            <a href="javascript:" lay-href=""> <i class="iconfont iconhome"></i>首页</a>
            <a><cite>代理报关</cite></a>
            <a><cite>报关列表</cite></a>

            <div class="layui-card-header-left" title="刷新" zmark-event="layui.manage.render">
                <i class="layui-icon layui-icon-refresh layui-anim" zmark-anim="layui-anim-rotate"></i>
            </div>
        </div>
    </div>
    <div class="layui-card mt20">
        <div class="layui-card-body table-box">
            <form class="layui-form" method="post" id="form-order-list" onsubmit="return false" lay-filter="form-order-list">
                <input type="hidden" name="statusId"/>
                <input type="hidden" name="iePort" id="iePort"/>
                <input type="hidden" name="cusTrafMode" id="cusTrafMode"/>
                <input type="hidden" name="supvModeCdde" id="supvModeCdde"/>
                <input type="hidden" name="queryDate" id="queryDate" value="a.date_created"/>
                <div class="layui-row block pb10">
                    <ul class="extra-l fl" id="queryStatus">
                        <li><a href="javascript:" class="curr" status="">全部订单</a></li>
                        <li><a href="javascript:" status="wait_receive">待接单</a></li>
                        <li><a href="javascript:" status="reviewed">已接单</a></li>
                        <li><a href="javascript:" status="made">已制单</a></li>
                        <li><a href="javascript:" status="sent">已发送</a></li>
                        <li><a href="javascript:" status="passed">已放行</a></li>
                        <li class="fore2"></li>
                    </ul>
                    <div class="fr">
                        <button type="button" class="layui-btn" lay-href="/declare/manage">快捷下单</button>
                    </div>
                </div>
                <div class="layui-row">
                    <div class="search-box" style="width: 970px">
                        <input type="text" name="keyword" class="layui-input" style="width: 100%" placeholder="搜索系统单号、客户单号、提运单号、合同号、统一编码、报关单号、境内收发货人、消费使用单位、生产销售单位、运输工具名称、航次号"/>
                    </div>
                </div>
                <div class="layui-row mt10">
                    <div class="layui-col-xs2 pr4">
                        <input type="text" class="layui-input" id="iePortName" placeholder="进出境关别"/>
                    </div>
                    <div class="layui-col-xs2 pr4">
                        <input type="text" class="layui-input" id="cusTrafModeName" placeholder="运输方式"/>
                    </div>
                    <div class="layui-col-xs2 pr4">
                        <input type="text" class="layui-input" id="supvModeCddeName" placeholder="监管方式"/>
                    </div>
                    <div class="layui-col-xs6">
                        <div class="layui-col-xs5 pr4">
                            <input type="text" class="layui-input picker-date" id="dateStart" name="dateStart" placeholder="下单开始时间"/>
                        </div>
                        <div class="layui-col-xs5">
                            <input type="text" class="layui-input picker-date" id="dateEnd" name="dateEnd" placeholder="下单结束时间"/>
                        </div>
                        <div class="layui-col-xs2">
                            <button type="submit" class="layui-btn search-layui-btn" lay-submit="" style="margin-top: -1px;margin-left: 0px;width: 100%" lay-filter="search-order-list"><i class="layui-icon layui-icon-search"></i></button>
                        </div>
                    </div>
                </div>
                <div class="layui-row mt10">
                    <table class="zm-tab order-tab" id="tab-order-list">
                        <colgroup>
                            <col width="50">
                            <col>
                            <col width="150">
                            <col width="150">
                            <col width="150">
                            <col width="150">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>
                                <input type="checkbox" name="tabCheckAll" id="checkbox-order-list-check-all" lay-skin="primary" lay-filter="checkbox-order-list-check-all"/>
                            </th>
                            <th>订单信息</th>
                            <th>进/出境关别</th>
                            <th>运输方式</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                    </table>
                    <div class="blank-list">
                        <i class="iconfont iconwushuju"></i>
                        <dd>无订单数据，<a href="javascript:" class="tcolor" lay-href="/declare/manage">立即下单</a></dd>
                    </div>
                    <div class="zm-pagination">
                        <div id="order-list-pagination"></div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/html" id="tpl-order-list">
    {{# layui.each(d,function(i,o){ }}
    <tbody>
    <tr class="sep-row">
        <td colspan="6"></td>
    </tr>
    <tr class="tr-th">
        <td colspan="6">
            <input type="checkbox" lay-skin="primary" name="orderId" value="{{o.id}}" lay-filter="checkbox-order-list-order-id"/>
            <span class="mr30"><a href="javascript:" lay-href="/declare/detail/id={{o.id}}" title="{{o.docNo}}" class="copy">{{o.docNo}}</a></span>
            {{# if(layui.com.isNotEmpty(o.customerOrderNo)){ }}
                <span>客户单号：</span>
                <span class="mr30 color-black"><span class="copy">{{o.customerOrderNo}}</span></span>
            {{# } }}
            <span>下单时间：</span>
            <span title="{{o.dateCreated}}" class="mr30 color-black">{{o.dateCreated}}</span>
            <span>监管方式：</span>
            <span class="color-black mr30">{{layui.com.removeNull(o.supvModeCddeName)}}</span>
            <span>申报日期：</span>
            <span class="color-black mr30">{{layui.com.removeNull(o.ddate)}}</span>
        </td>
    </tr>
    <tr class="tr-tb">
        <td colspan="2" class="t-a-l">
            {{# if(o.cusIEFlag == 'I'){ }}
            <i class="iconfont iconjin color-blue f24"></i>
            {{# }else if(o.cusIEFlag == 'E'){ }}
            <i class="iconfont iconchu color-green f24"></i>
            {{# } }}
            商品项数：{{layui.com.removeNull(o.productQty)}}<br/>
           <div class="layui-row" style="padding-left: 26px">
               报关单号：{{layui.com.removeNull(o.entryId)}}
           </div>
            <div class="layui-row" style="padding-left: 26px">
                报关服务：{{layui.com.removeNull(o.declareServiceTypeDesc)}}
            </div>
            {{# if(o.declareServiceType == '1'){ }}
            <div class="layui-row" style="padding-left: 2px">
                9710订单编号：<span class="mr30 color-black"><span class="copy">{{layui.com.removeNull(o.cebOrderNo)}}</span></span>
            </div>
            {{# } }}
            {{# if(layui.com.isNotEmpty(o.consigneeCname)){ }}
            <div class="layui-row" style="padding-left: 2px">
                境内收发货人：{{layui.com.removeNull(o.consigneeCname)}}
            </div>
            {{# } }}
        </td>
        <td>
            <div class="amount">
                {{# if(layui.com.isEmpty(o.iePortName)){ }}
                    {{layui.com.removeNull(o.customsName)}}
                {{# }else{ }}
                    {{# if(o.originCustomsName == o.customsName){ }}
                        {{layui.com.removeNull(o.customsName)}}
                    {{# }else{ }}
                        <div style="text-decoration: line-through;color: red">{{layui.com.removeNull(o.originCustomsName)}}</div>
                        <div>{{layui.com.removeNull(o.iePortName)}}</div>
                    {{# } }}
                {{# } }}
            </div>
        </td>
        <td>
            <div class="amount">
                {{layui.com.removeNull(o.cusTrafModeName)}}
            </div>
        </td>
        <td>
            <div class="layui-row {{o.statusId}}">{{o.statusDesc}}</div>
            <div class="layui-row"><a href="javascript:" lay-href="/declare/detail/id={{o.id}}">订单详情</a></div>
        </td>
        <td>
            {{# if(layui.com.isNotEmpty(o.declarationId)){ }}
                <div class="layui-row"><a href="javascript:" lay-href="/declare/detail{{'I'==o.cusIEFlag?'imp':'exp'}}/id={{o.declarationId}}">查看报关单</a></div>

                <div class="layui-row" down-declare="{{o.docNo}}"></div>
            {{# } }}
        </td>
    </tr>
    </tbody>
    {{# }); }}
</script>
<script>
    layui.use('trustDeclareList', layui.factory('trustDeclareList'));
</script>